package com.zy.cat.entity.dev.act.resp;


import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

import org.apache.commons.lang3.StringUtils;

import com.fasterxml.jackson.annotation.JsonIgnore;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;

import lombok.NoArgsConstructor;

/**
 * 
 * @info 线上推广开发者大转盘实体类
 * @author Link
 * @date 2020-03-18 17:06
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel("线上推广开发者免费抽信息实体类")
public class APPActDBHistoryResp {
	
	@ApiModelProperty(value = "商品ID", example = "18986866666")
	private String sid = "";

	@JsonIgnore
	@ApiModelProperty(value = "用户ID")
	private String pid = "";
	
	@JsonIgnore
	@ApiModelProperty(value = "创建时间", example = "2019-02-22")
	private String ctime = "";

	@ApiModelProperty(value = "开奖期数（叠加）", example = "0")
	private int cindex;

	@ApiModelProperty(value = "中奖券ID", example = "505685856")
	private long qid;
	
	@ApiModelProperty(value = "中奖者手机", example = "138****7586")
	private String phone="-";
	
	@ApiModelProperty(value = "个人券ID列表", example = "505685856")
	private String qids;

	@ApiModelProperty(value = "进度（0.开奖中、1.未中奖、2.已中奖）", example = "0")
	private int dstatus;

	@ApiModelProperty(value = "商品标题", example = "商品标题")
	private String stitle = "";

	@ApiModelProperty(value = "商品价值", example = "商品价值")
	private String srmb = "";

	@JsonIgnore
	@ApiModelProperty(value = "商品主图", example = "505685856")
	private String sicon = "";
	
	@JsonIgnore
	@ApiModelProperty(value = "商品详情图", example = "505685856")
	private String simgs = "";
	
	@ApiModelProperty(value = "商品主图", example = "505685856")
	private List<String> icons ;
	
	@ApiModelProperty(value = "商品详情图", example = "505685856")
	private List<String> imgs ;
	
	@ApiModelProperty(value = "最多参与人数", example = "0")
	private long dcount;
	
	@ApiModelProperty(value = "已参与人数", example = "0")
	private long ycount;
	
	@ApiModelProperty(value = "计算值", example = "0")
	private long js;
	
	
	
	public APPActDBHistoryResp(String pid) {
		super();
		this.pid = pid;
	}

	public APPActDBHistoryResp(String sid, int cindex) {
		super();
		this.sid = sid;
		this.cindex = cindex;
	}

	public APPActDBHistoryResp(String sid, String pid, int cindex) {
		super();
		this.sid = sid;
		this.pid = pid;
		this.cindex = cindex;
	}
  
	public void setSicon(String sicon) {
		this.sicon = sicon;
		if(StringUtils.isNotBlank(sicon)) {
			this.icons= Arrays.asList(sicon.split(","));
		}
	}
	public void setSimgs(String simgs) {
		this.simgs = simgs;
		if(StringUtils.isNotBlank(simgs)) {
			this.imgs= Arrays.asList(simgs.split(","));
		}
	}

//	public List<String> getSicon() {
//		if(sicon!=null) {
//			return Arrays.asList(sicon.split(","));
//		}
//		return new ArrayList<String>();
//	}
// 
//	public List<String> getSimgs() {
//		if(simgs!=null) {
//			return Arrays.asList(simgs.split(","));
//		}
//		return new ArrayList<String>();
//	}
	

}
